<?php
	require_once('inc.config.php');
	
	$action = $_GET["action"];
	$type = $_GET["type"];
	$param = $type=="0"?"qg":"qz";
	
	if($action=="add"){
		$result = $myQgqzhouse->addOneQgHouse(); 
	}else if($action=="edit"){
		$result = $myQgqzhouse->updateOneQgHouse();
	}else if($action=="delete"){
		$result = $myQgqzhouse->deleteOneQgHouse();
	}else if($action=="update"){
		$result = $myQgqzhouse->updateListQgHouse($_GET["upordown"]);
		echo $result;
		exit;
	}
	
	if($result=="success"){
		header("Location:agent_admin_success.php?type=".$param);
	}else{
		//header("Location:agent_admin_fail.php");
	}
?>